<!DOCTYPE html>
<html >
<head>

    <!--[if lt IE 9]>
        <style>body {display: none; background: none !important} </style>
        <meta http-equiv="Refresh" Content="0; url=//outdatedbrowser.com/" />
    <![endif]-->

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no" />
<meta name="author" content="泽阳" />



<meta name="description" content="前言简单记录自己个性化多说样式的过程，参考的教程和借鉴的代码基本包含在 参考资料 列表中，有不明白的可以试着查阅这些资料。
相关下载
自用完整多说 CSS 样式文件: duosuo.css by MOxFIVE自用多说 embed-js 文件: embed-js by MOxFIVE

UA 浏览器标识">
<meta property="og:type" content="article">
<meta property="og:title" content="多说样式折腾记录 — 添加 UA 浏览器标识、旋转头像等">
<meta property="og:url" content="http://git.zhoumq.cn/2015/09/29/duoshuo-style/index.html">
<meta property="og:site_name" content="泽阳">
<meta property="og:description" content="前言简单记录自己个性化多说样式的过程，参考的教程和借鉴的代码基本包含在 参考资料 列表中，有不明白的可以试着查阅这些资料。
相关下载
自用完整多说 CSS 样式文件: duosuo.css by MOxFIVE自用多说 embed-js 文件: embed-js by MOxFIVE

UA 浏览器标识">
<meta property="og:image" content="http://git.zhoumq.cn/resources/UA-label.png">
<meta property="og:image" content="http://git.zhoumq.cn/resources/root-label.png">
<meta property="og:image" content="http://git.zhoumq.cn/resources/rotate.gif">
<meta property="og:image" content="http://git.zhoumq.cn/resources/UA-label.png">
<meta property="og:updated_time" content="2017-01-15T13:49:19.060Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="多说样式折腾记录 — 添加 UA 浏览器标识、旋转头像等">
<meta name="twitter:description" content="前言简单记录自己个性化多说样式的过程，参考的教程和借鉴的代码基本包含在 参考资料 列表中，有不明白的可以试着查阅这些资料。
相关下载
自用完整多说 CSS 样式文件: duosuo.css by MOxFIVE自用多说 embed-js 文件: embed-js by MOxFIVE

UA 浏览器标识">
<meta name="twitter:image" content="http://git.zhoumq.cn/resources/UA-label.png">

<link rel="apple-touch-icon" href= "/apple-touch-icon.png">


    <link rel="alternate" href="/atom.xml" title="泽阳" type="application/atom+xml">



    <link rel="shortcut icon" href="/favicon.png">



    <link href="//cdn.bootcss.com/animate.css/3.5.1/animate.min.css" rel="stylesheet">



    <link href="//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.css" rel="stylesheet">



    <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
    <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-minimal.css" rel="stylesheet">


<link rel="stylesheet" href="/css/style.css">



<link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">


<title>多说样式折腾记录 — 添加 UA 浏览器标识、旋转头像等 | 泽阳</title>

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

<script>
    var yiliaConfig = {
        fancybox: true,
        animate: true,
        isHome: false,
        isPost: true,
        isArchive: false,
        isTag: false,
        isCategory: false,
        fancybox_js: "//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.js",
        scrollreveal: "//cdn.bootcss.com/scrollReveal.js/3.1.4/scrollreveal.min.js",
        search: undefined
    }
</script>


    <script>
        yiliaConfig.jquery_ui = [true, "//cdn.bootcss.com/jqueryui/1.10.4/jquery-ui.min.js", "//cdn.bootcss.com/jqueryui/1.10.4/css/jquery-ui.min.css"];
    </script>



    <script> yiliaConfig.rootUrl = "\/";</script>






</head>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
    <header id="header" class="inner">
        <a href="/" class="profilepic">
            <img src="/img/allen.jpg" class="animated zoomIn">
        </a>
        <hgroup>
          <h1 class="header-author"><a href="/">泽阳</a></h1>
        </hgroup>

        
        <p class="header-subtitle">牛奶&amp;咖啡</p>
        

        


        
            <div id="switch-btn" class="switch-btn">
                <div class="icon">
                    <div class="icon-ctn">
                        <div class="icon-wrap icon-house" data-idx="0">
                            <div class="birdhouse"></div>
                            <div class="birdhouse_holes"></div>
                        </div>
                        <div class="icon-wrap icon-ribbon hide" data-idx="1">
                            <div class="ribbon"></div>
                        </div>
                        
                        <div class="icon-wrap icon-link hide" data-idx="2">
                            <div class="loopback_l"></div>
                            <div class="loopback_r"></div>
                        </div>
                        
                        
                        <div class="icon-wrap icon-me hide" data-idx="3">
                            <div class="user"></div>
                            <div class="shoulder"></div>
                        </div>
                        
                    </div>
                    
                </div>
                <div class="tips-box hide">
                    <div class="tips-arrow"></div>
                    <ul class="tips-inner">
                        <li>菜单</li>
                        <li>标签</li>
                        
                        <li>友情链接</li>
                        
                        
                        <li>关于我</li>
                        
                    </ul>
                </div>
            </div>
        

        <div id="switch-area" class="switch-area">
            <div class="switch-wrap">
                <section class="switch-part switch-part1">
                    <nav class="header-menu">
                        <ul>
                        
                            <li><a href="/">主页</a></li>
                        
                            <li><a href="/archives/">所有文章</a></li>
                        
                            <li><a href="/tags/">标签云</a></li>
                        
                            <li><a href="/about/">关于我</a></li>
                        
                        </ul>
                    </nav>
                    <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" href="/mail@zhoumq.cn" title="Email"></a>
                            
                                <a class="fa GitHub" href="https://github.com/zhoumingque" title="GitHub"></a>
                            
                                <a class="fa RSS" href="/atom.xml" title="RSS"></a>
                            
                        </ul>
                    </nav>
                </section>
                
                
                <section class="switch-part switch-part2">
                    <div class="widget tagcloud" id="js-tagcloud">
                        <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/CSS/">CSS</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hexo/">Hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/JavaScript/">JavaScript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/MVVM/">MVVM</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/UA/">UA</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/多说/">多说</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/旧事/">旧事</a></li></ul>
                    </div>
                </section>
                
                
                
                <section class="switch-part switch-part3">
                    <div id="js-friends">
                    
                      <a class="main-nav-link switch-friends-link" href="https://hexo.io">Hexo</a>
                    
                      <a class="main-nav-link switch-friends-link" href="https://pages.github.com/">GitHub</a>
                    
                      <a class="main-nav-link switch-friends-link" href="http://moxfive.xyz/">MOxFIVE</a>
                    
                    </div>
                </section>
                

                
                
                <section class="switch-part switch-part4">
                
                    <div id="js-aboutme">专注于前端</div>
                </section>
                
            </div>
        </div>
    </header>                
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
      <div class="overlay">
          <div class="slider-trigger"></div>
          <h1 class="header-author js-mobile-header hide"><a href="/" title="回到主页">泽阳</a></h1>
      </div>
    <div class="intrude-less">
        <header id="header" class="inner">
            <a href="/" class="profilepic">
                <img src="/img/allen.jpg" class="animated zoomIn">
            </a>
            <hgroup>
              <h1 class="header-author"><a href="/" title="回到主页">泽阳</a></h1>
            </hgroup>
            
            <p class="header-subtitle">牛奶&amp;咖啡</p>
            
            <nav class="header-menu">
                <ul>
                
                    <li><a href="/">主页</a></li>
                
                    <li><a href="/archives/">所有文章</a></li>
                
                    <li><a href="/tags/">标签云</a></li>
                
                    <li><a href="/about/">关于我</a></li>
                
                <div class="clearfix"></div>
                </ul>
            </nav>
            <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" target="_blank" href="/mail@zhoumq.cn" title="Email"></a>
                            
                                <a class="fa GitHub" target="_blank" href="https://github.com/zhoumingque" title="GitHub"></a>
                            
                                <a class="fa RSS" target="_blank" href="/atom.xml" title="RSS"></a>
                            
                        </ul>
            </nav>
        </header>                
    </div>
    <link class="menu-list" tags="标签" friends="友情链接" about="关于我"/>
</nav>
      <div class="body-wrap"><article id="post-duoshuo-style" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/2015/09/29/duoshuo-style/" class="article-date">
      <time datetime="2015-09-28T17:24:41.000Z" itemprop="datePublished">2015-09-29</time>
</a>


    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      多说样式折腾记录 — 添加 UA 浏览器标识、旋转头像等
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        
    <div class="article-category tagcloud">
    <a class="article-category-link" href="/categories/术业专攻/">术业专攻</a>
    </div>


        
    <div class="article-tag tagcloud">
        <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/CSS/">CSS</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo/">Hexo</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JavaScript/">JavaScript</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/UA/">UA</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/多说/">多说</a></li></ul>
    </div>

        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
		  
		  
		  
          
        <p></p><h2 id="intro">前言</h2>简单记录自己个性化多说样式的过程，参考的教程和借鉴的代码基本包含在 <a href="/2015/09/29/duoshuo-style/#参考资料">参考资料</a> 列表中，有不明白的可以试着查阅这些资料。<p></p>
<h3 id="相关下载"><a href="#相关下载" class="headerlink" title="相关下载"></a>相关下载</h3><blockquote>
<p>自用完整多说 CSS 样式文件: <a href="/resources/duosuo.css">duosuo.css by MOxFIVE</a><br>自用多说 embed-js 文件: <a href="/resources/embed.js">embed-js by MOxFIVE</a></p>
</blockquote>
<h2 id="UA-浏览器标识"><a href="#UA-浏览器标识" class="headerlink" title="UA 浏览器标识"></a>UA 浏览器标识</h2><p><img src="/resources/UA-label.png" alt="UA 浏览器标识"></p>
<a id="more"></a>
<h3 id="本地化-embed-js"><a href="#本地化-embed-js" class="headerlink" title="本地化 embed-js"></a>本地化 embed-js</h3><p>　1. 先下载我修改好的 <a href="/resources/embed.js">embed.js</a>，文件源于网页分享，稍作调整: </p>
<blockquote>
<ul>
<li>去掉了略显累赘的浏览器版本号；</li>
<li>修改了部分浏览器和系统的图标。</li>
</ul>
</blockquote>
<p>　2. 获取多说数字 ID:</p>
<blockquote>
<p>访问 <a href="http://duoshuo.com/settings/" target="_blank" rel="external">多说后台</a>，点击左侧你头像旁的昵称，之后会跳转到你的多说主页<br><code>http://duoshuo.com/profile/你的数字ID/</code>，最后那几个数字就是你的数字 ID，记下备用。</p>
</blockquote>
<p>　3. 个人化 embed.js:</p>
<blockquote>
<p>将 <code>e.user_id</code> 的值修改为你的多说数字 ID。</p>
</blockquote>
<figure class="highlight js"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">function</span> <span class="title">sskadmin</span>(<span class="params">e</span>) </span>&#123;</div><div class="line">    <span class="keyword">var</span> ssk = <span class="string">''</span>;</div><div class="line">    <span class="keyword">if</span> (e.user_id == 你的多说数字ID)</div></pre></td></tr></table></figure>
<p>　4. 云端化 embed.js:</p>
<blockquote>
<p>让你的专属 embed.js 能通过一个网址访问。</p>
<ul>
<li>Hexo 博客的话，假设你把 embed.js 放到 <code>/themes/&lt;主题名字&gt;/source/js/</code> 文件夹下，部署云端后，你的文件地址就是 <code>博客地址/js/embed.js</code>。</li>
</ul>
</blockquote>
<p>　5. 修改多说调用地址:</p>
<blockquote>
<p>修改多说代码中的 <code>ds.src</code> 为你的 <code>embed.js</code> 地址；</p>
<ul>
<li>主题 <a href="https://github.com/MOxFIVE/hexo-theme-yelee" title="简而不减 Hexo 双栏博客主题" target="_blank" rel="external">Yelee (v3.0)</a> 在 <code>yelee/layout/_partial/comments/duoshuo.ejs</code> 里修改。</li>
</ul>
</blockquote>
<figure class="highlight js"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">var</span> duoshuoQuery = &#123;<span class="attr">short_name</span>:<span class="string">"&lt;%=theme.duoshuo%&gt;"</span>&#125;;</div><div class="line">(<span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</div><div class="line">    <span class="keyword">var</span> ds = <span class="built_in">document</span>.createElement(<span class="string">'script'</span>);</div><div class="line">    ds.type = <span class="string">'text/javascript'</span>;ds.async = <span class="literal">true</span>;</div><div class="line"></div><div class="line">    ds.src = <span class="string">'http://moxfive.xyz/resources/embed.js'</span>;</div><div class="line">    <span class="comment">/*上面是我自己的 embed.js 链接，请改为你自己的地址*/</span></div><div class="line"></div><div class="line">    ds.charset = <span class="string">'UTF-8'</span>;</div><div class="line">    (<span class="built_in">document</span>.getElementsByTagName(<span class="string">'head'</span>)[<span class="number">0</span>] </div><div class="line">     || <span class="built_in">document</span>.getElementsByTagName(<span class="string">'body'</span>)[<span class="number">0</span>]).appendChild(ds);</div><div class="line">&#125;)();</div></pre></td></tr></table></figure>
<h3 id="引入-Font-Awesome"><a href="#引入-Font-Awesome" class="headerlink" title="引入 Font Awesome"></a>引入 <a href="http://fontawesome.io/get-started/" title="Easy ways to get Font Awesome 4.4.0 onto your website" target="_blank" rel="external">Font Awesome</a></h3><p>　　这里介绍下最快捷的方式，把下面代码放入对应 HTML head 头部即可。例如 Hexo 博客主题的通常是在 layout 文件夹下的 Head 文件中引入 <a href="https://github.com/MOxFIVE/M-Hexo-Blog/commit/95dbdbacf628e531902f55714f4dae57f3bab070" title="feat: duoshuo style 个性化多说样式" target="_blank" rel="external">[G]</a>。</p>
<blockquote>
<p>主题 <a href="https://github.com/MOxFIVE/hexo-theme-yelee" title="简而不减 Hexo 双栏博客主题" target="_blank" rel="external">Yelee</a> 和 <a href="https://github.com/litten/hexo-theme-yilia" title="一个简洁优雅的 Hexo 主题" target="_blank" rel="external">Yilia</a> 已自带 Font Awesome，无需再引入。</p>
</blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">"stylesheet"</span> <span class="attr">href</span>=<span class="string">"//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css"</span>&gt;</span></div></pre></td></tr></table></figure>
<h3 id="添加对应-CSS"><a href="#添加对应-CSS" class="headerlink" title="添加对应 CSS"></a>添加对应 CSS</h3><p>　　拷贝以下代码到多说 <a href="http://wsgzao.github.io/post/duoshuo/#多说后台自定义CSS" target="_blank" rel="external">后台自定义 CSS</a> 框中保存。在网友分享基础上设置了透明度，没那么刺眼花哨了，顺便改了一下未识别 UA 的样式。</p>
<blockquote>
<p>CSS 有点繁琐，不清楚如何为这些 UA 设置 Class，只好一个个分开写了。</p>
</blockquote>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div><div class="line">156</div><div class="line">157</div><div class="line">158</div><div class="line">159</div><div class="line">160</div><div class="line">161</div><div class="line">162</div><div class="line">163</div><div class="line">164</div><div class="line">165</div><div class="line">166</div><div class="line">167</div><div class="line">168</div><div class="line">169</div><div class="line">170</div><div class="line">171</div><div class="line">172</div><div class="line">173</div><div class="line">174</div><div class="line">175</div><div class="line">176</div><div class="line">177</div><div class="line">178</div><div class="line">179</div><div class="line">180</div><div class="line">181</div><div class="line">182</div><div class="line">183</div><div class="line">184</div><div class="line">185</div><div class="line">186</div><div class="line">187</div><div class="line">188</div><div class="line">189</div><div class="line">190</div><div class="line">191</div><div class="line">192</div><div class="line">193</div><div class="line">194</div><div class="line">195</div><div class="line">196</div><div class="line">197</div><div class="line">198</div><div class="line">199</div><div class="line">200</div><div class="line">201</div><div class="line">202</div><div class="line">203</div><div class="line">204</div><div class="line">205</div><div class="line">206</div><div class="line">207</div><div class="line">208</div><div class="line">209</div><div class="line">210</div><div class="line">211</div><div class="line">212</div><div class="line">213</div><div class="line">214</div><div class="line">215</div><div class="line">216</div><div class="line">217</div><div class="line">218</div><div class="line">219</div><div class="line">220</div><div class="line">221</div><div class="line">222</div><div class="line">223</div><div class="line">224</div><div class="line">225</div><div class="line">226</div><div class="line">227</div><div class="line">228</div></pre></td><td class="code"><pre><div class="line"><span class="selector-tag">span</span><span class="selector-class">.ua</span> &#123;</div><div class="line">    <span class="attribute">display</span>: inline-block <span class="meta">!important</span>;</div><div class="line">    <span class="attribute">margin</span>: auto <span class="number">1px</span> .<span class="number">3em</span> <span class="meta">!important</span>;</div><div class="line">    <span class="attribute">color</span>: <span class="number">#fff</span> <span class="meta">!important</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_other</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#bdb2a7</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">color</span>: <span class="number">#fff</span>;</div><div class="line">    <span class="attribute">border</span>: <span class="number">1px</span> solid <span class="number">#BBB</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_other</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#bdb2a7</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">color</span>: <span class="number">#fff</span>;</div><div class="line">    <span class="attribute">border</span>: <span class="number">1px</span> solid <span class="number">#BBB</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_other</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_other</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_ie</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#428bca</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#357ebd</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_ie</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_firefox</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#f0ad4e</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#eea236</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_firefox</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_maxthon</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#7373B9</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#7373B9</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_maxthon</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_ucweb</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#FF740F</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#d43f3a</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_ucweb</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_sogou</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#78ACE9</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#4cae4c</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_sogou</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_2345explorer</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#2478B8</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#4cae4c</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_2345explorer</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_2345chrome</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#F9D024</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#4cae4c</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_2345chrome</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_mi</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#FF4A00</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#4cae4c</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_mi</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_lbbrowser</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#FC9D2E</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#4cae4c</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_lbbrowser</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_chrome</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#EE6252</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#4cae4c</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_chrome</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_qq</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#3D88A8</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#4cae4c</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_qq</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_apple</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#E95620</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#4cae4c</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_apple</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_opera</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#d9534f</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#d43f3a</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.ua_opera</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_vista</span>,<span class="selector-class">.os_2000</span>,<span class="selector-class">.os_windows</span>,<span class="selector-class">.os_xp</span>,<span class="selector-class">.os_7</span>,<span class="selector-class">.os_8</span>,<span class="selector-class">.os_8_1</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#39b3d7</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#46b8da</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_vista</span><span class="selector-pseudo">:hover</span>,<span class="selector-class">.os_2000</span><span class="selector-pseudo">:hover</span>,<span class="selector-class">.os_windows</span><span class="selector-pseudo">:hover</span>,<span class="selector-class">.os_xp</span><span class="selector-pseudo">:hover</span>,<span class="selector-class">.os_7</span><span class="selector-pseudo">:hover</span>,<span class="selector-class">.os_8</span><span class="selector-pseudo">:hover</span>,<span class="selector-class">.os_8_1</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_android</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#98C13D</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#01B171</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_android</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_ubuntu</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#DD4814</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#01B171</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_ubuntu</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_linux</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#3A3A3A</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#1F1F1F</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_linux</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_mac</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#666666</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#1F1F1F</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_mac</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_unix</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#006600</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#1F1F1F</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_unix</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_nokia</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#014485</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#1F1F1F</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.os_nokia</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"><span class="comment">/*UA End*/</span></div></pre></td></tr></table></figure>
<h3 id="显示博主标记"><a href="#显示博主标记" class="headerlink" title="显示博主标记"></a>显示博主标记</h3><p><img src="/resources/root-label.png" alt="博主标记"></p>
<p>　　分别添加以下代码到你的 embed.js 文件和多说自定义 CSS ，自己多说账户的评论旁将显示博主标记。如果你用的是我上面提供的 <a href="/resources/embed.js">embed.js</a>，那修改好 <code>e.user_id</code> 时博主标记应该已经显示了。</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line"><span class="comment">/*博主标记: 添加到 embed.js*/</span></div><div class="line"><span class="function"><span class="keyword">function</span> <span class="title">sskadmin</span>(<span class="params">e</span>) </span>&#123;</div><div class="line">    <span class="keyword">var</span> ssk = <span class="string">''</span>;</div><div class="line">    <span class="keyword">if</span> (e.user_id == 你的多说数字ID) &#123;</div><div class="line">        <span class="keyword">if</span> (checkMobile()) &#123;</div><div class="line">            ssk = <span class="string">'&lt;span class="ua"&gt;&lt;span class="sskadmin"&gt;博主&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;'</span>;</div><div class="line">        &#125; <span class="keyword">else</span> &#123;</div><div class="line">            ssk = <span class="string">'&lt;span class="ua"&gt;&lt;span class="sskadmin"&gt;博主&lt;/span&gt;&lt;/span&gt;'</span>;</div><div class="line">        &#125;</div><div class="line">    &#125; <span class="keyword">else</span> &#123;</div><div class="line">        <span class="keyword">if</span> (checkMobile()) &#123;</div><div class="line">            ssk = <span class="string">'&lt;br&gt;&lt;br&gt;'</span>;</div><div class="line">        &#125;</div><div class="line">    &#125;</div><div class="line">    <span class="keyword">return</span> ssk;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line"><span class="comment">/*博主标记 CSS*/</span></div><div class="line"><span class="selector-class">.sskadmin</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#00a67c</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-color</span>: <span class="number">#01B171</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">4px</span>;</div><div class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">5px</span><span class="meta">!important</span>;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">4</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-class">.sskadmin</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h2 id="个性化-CSS-样式"><a href="#个性化-CSS-样式" class="headerlink" title="个性化 CSS 样式"></a>个性化 CSS 样式</h2><p>　　通过网友教程，官方文档和审查元素工具个性化多说 CSS 样式。</p>
<h3 id="旋转头像"><a href="#旋转头像" class="headerlink" title="旋转头像"></a>旋转头像</h3><p><img src="/resources/rotate.gif" alt="旋转头像"><br>　　源于网友分享，修改了旋转度数，动画时间，内边距。</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="comment">/*头像样式*/</span></div><div class="line"><span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-avatar</span>&#123;<span class="attribute">background</span>:none <span class="meta">!important</span>; <span class="attribute">box-shadow</span>:none <span class="meta">!important</span>;&#125;</div><div class="line"><span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-avatar</span> <span class="selector-tag">img</span> , <span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-tag">ul</span><span class="selector-class">.ds-children</span> <span class="selector-class">.ds-avatar</span> <span class="selector-tag">img</span>&#123;<span class="attribute">width</span>:<span class="number">50px</span> <span class="meta">!important</span>;<span class="attribute">height</span>: <span class="number">50px</span> <span class="meta">!important</span>;<span class="attribute">-webkit-transition</span>: .<span class="number">9s</span>;<span class="attribute">-moz-transition</span>: .<span class="number">9s</span>;<span class="attribute">-o-transition</span>: .<span class="number">9s</span>;<span class="attribute">-ms-transition</span>: .<span class="number">9s</span>;<span class="attribute">padding</span>: <span class="number">2px</span>;<span class="attribute">border</span>: <span class="number">1px</span> solid <span class="number">#ddd</span>;<span class="attribute">background</span>: <span class="number">#fff</span>;&#125;</div><div class="line"><span class="comment">/*鼠标悬停旋转头像*/</span></div><div class="line"><span class="selector-class">.ds-post</span><span class="selector-pseudo">:hover</span> <span class="selector-class">.ds-avatar</span> <span class="selector-tag">img</span>&#123;<span class="attribute">transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">-webkit-transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">-moz-transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">-o-transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">-ms-transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">border-radius</span>:<span class="number">30px</span> <span class="meta">!important</span>;&#125;</div><div class="line"><span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-avatar</span> <span class="selector-tag">img</span><span class="selector-pseudo">:hover</span>&#123;<span class="attribute">transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">-webkit-transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">-moz-transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">-o-transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">-ms-transform</span>:<span class="built_in">rotate</span>(360deg);<span class="attribute">border-radius</span>:<span class="number">30px</span> <span class="meta">!important</span>;&#125;</div></pre></td></tr></table></figure>
<h3 id="通用样式"><a href="#通用样式" class="headerlink" title="通用样式"></a>通用样式</h3><p>　　源于网友分享。</p>
<figure class="highlight scss"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-comment-body</span>, <span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-tag">ul</span><span class="selector-class">.ds-children</span> <span class="selector-class">.ds-comment-body</span>&#123;<span class="attribute">padding-left</span>:<span class="number">70px</span> <span class="meta">!important</span>;&#125;</div><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-comment-body</span>, <span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-tag">ul</span><span class="selector-class">.ds-children</span> <span class="selector-class">.ds-comment-body</span>&#123;<span class="attribute">padding-left</span>:<span class="number">70px</span> <span class="meta">!important</span>;&#125;</div><div class="line"><span class="selector-class">.ds-post</span>:hover&#123;<span class="attribute">background</span>:<span class="number">#eee</span> <span class="meta">!important</span>;&#125;</div><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-tag">ul</span><span class="selector-class">.ds-children</span> <span class="selector-class">.ds-avatar</span>&#123;<span class="attribute">width</span>:<span class="number">50px</span> <span class="meta">!important</span>;&#125;</div><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-replybox</span>&#123;<span class="attribute">padding</span>: <span class="number">0</span> <span class="number">0</span> <span class="number">0</span> <span class="number">80px</span> <span class="meta">!important</span>;&#125;</div><div class="line"><span class="selector-id">#ds-reset</span> <span class="selector-id">#ds-ctx</span> <span class="selector-class">.ds-ctx-entry</span> <span class="selector-class">.ds-ctx-body</span>&#123;<span class="attribute">margin-left</span>: <span class="number">68px</span> <span class="meta">!important</span>;&#125;</div><div class="line"><span class="selector-id">#ds-recent-comments</span> <span class="selector-tag">li</span><span class="selector-class">.ds-comment</span>:nth-of-type(1)&#123;<span class="attribute">border</span>:none <span class="meta">!important</span>;&#125;</div><div class="line"><span class="selector-id">#ds-thread</span>&#123; </div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">3px</span>;</div><div class="line">&#125;</div><div class="line"><span class="comment">/** 多说最近留言样式 **/</span></div><div class="line"><span class="selector-id">#ds-recent-comments</span> <span class="selector-class">.ds-avatar</span> <span class="selector-tag">img</span>&#123;   </div><div class="line">    <span class="attribute">width</span>:<span class="number">54px</span>;<span class="attribute">height</span>:<span class="number">54px</span>; </div><div class="line">    <span class="attribute">border-radius</span>: <span class="number">50%</span>; </div><div class="line">    -webkit-<span class="attribute">border-radius</span>: <span class="number">50%</span>; </div><div class="line">    -moz-<span class="attribute">border-radius</span>:<span class="number">50%</span>;   </div><div class="line">    <span class="attribute">box-shadow</span>: inset <span class="number">0</span> -<span class="number">1px</span> <span class="number">0</span> <span class="number">#3333</span>sf;<span class="comment">/*设置图像阴影效果*/</span>  </div><div class="line">    -webkit-<span class="attribute">box-shadow</span>: inset <span class="number">0</span> -<span class="number">1px</span> <span class="number">0</span> <span class="number">#3333</span>sf;   </div><div class="line">    -webkit-<span class="attribute">transition</span>: <span class="number">0.4s</span>;      </div><div class="line">    -webkit-<span class="attribute">transition</span>: -webkit-transform <span class="number">0.4s</span> ease-out;   </div><div class="line">    <span class="attribute">transition</span>: transform <span class="number">0.4s</span> ease-out;</div><div class="line">    -moz-<span class="attribute">transition</span>: -moz-transform <span class="number">0.4s</span> ease-out;   </div><div class="line">&#125;    </div><div class="line"><span class="selector-id">#ds-recent-comments</span> <span class="selector-class">.ds-avatar</span> <span class="selector-tag">img</span>:hover&#123;  </div><div class="line">    <span class="attribute">box-shadow</span>: <span class="number">0</span> <span class="number">0</span> <span class="number">10px</span> <span class="number">#fff</span>; rgba(255,255,255,<span class="selector-class">.6</span>), inset 0 0 20px rgba(255,255,255,1);   </div><div class="line">    -webkit-<span class="attribute">box-shadow</span>: <span class="number">0</span> <span class="number">0</span> <span class="number">10px</span> <span class="number">#fff</span>; rgba(255,255,255,<span class="selector-class">.6</span>), inset 0 0 20px rgba(255,255,255,1);   </div><div class="line">    <span class="attribute">transform</span>: rotateZ(<span class="number">360deg</span>);</div><div class="line">    -webkit-<span class="attribute">transform</span>: rotateZ(<span class="number">360deg</span>);   </div><div class="line">    -moz-<span class="attribute">transform</span>: rotateZ(<span class="number">360deg</span>);   </div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h3 id="喜欢按钮样式"><a href="#喜欢按钮样式" class="headerlink" title="喜欢按钮样式"></a>喜欢按钮样式</h3><p>　　透明度，背景，边框等样式调整。</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line"><span class="selector-class">.ds-meta</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">5</span>;</div><div class="line">    &#125;</div><div class="line"><span class="selector-class">.ds-meta</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">    &#125;</div><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-tag">a</span><span class="selector-class">.ds-like-thread-button</span> &#123;</div><div class="line">    <span class="attribute">background-image</span>: none;</div><div class="line">    <span class="attribute">background-color</span>: <span class="number">#fee2d3</span>;</div><div class="line">    <span class="attribute">border</span>: none;</div><div class="line">    <span class="attribute">text-shadow</span>: none;</div><div class="line">    <span class="attribute">font-family</span>: inherit;</div><div class="line">    &#125;</div></pre></td></tr></table></figure>
<h3 id="社交账号登陆透明度"><a href="#社交账号登陆透明度" class="headerlink" title="社交账号登陆透明度"></a>社交账号登陆透明度</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-login-buttons</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: .<span class="number">5</span>;</div><div class="line">&#125;</div><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-login-buttons</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">    &#125;</div></pre></td></tr></table></figure>
<h3 id="评论、文本框字体"><a href="#评论、文本框字体" class="headerlink" title="评论、文本框字体"></a>评论、文本框字体</h3><p>　　默认字体偏小，稍作调整。</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-comment-body</span> <span class="selector-tag">p</span>, <span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-textarea-wrapper</span> <span class="selector-tag">textarea</span> &#123;</div><div class="line">    <span class="attribute">font-size</span>: <span class="number">1.15em</span>;</div><div class="line">    <span class="attribute">color</span>: <span class="number">#717171</span>;</div><div class="line">    <span class="attribute">font-family</span>: inherit;</div><div class="line">    &#125;</div></pre></td></tr></table></figure>
<h3 id="用户名等超链接颜色"><a href="#用户名等超链接颜色" class="headerlink" title="用户名等超链接颜色"></a>用户名等超链接颜色</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-highlight</span> &#123;</div><div class="line">    <span class="attribute">color</span>: <span class="number">#ef7c6c</span> <span class="meta">!important</span>;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h3 id="未登录用户名字颜色"><a href="#未登录用户名字颜色" class="headerlink" title="未登录用户名字颜色"></a>未登录用户名字颜色</h3><p>　　颜色与其他登陆用户保持一致；</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-user-name</span> &#123;</div><div class="line">    <span class="attribute">color</span>: <span class="number">#ef7c6c</span> <span class="meta">!important</span>;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h3 id="评论框背景图片"><a href="#评论框背景图片" class="headerlink" title="评论框背景图片"></a>评论框背景图片</h3><p>　　选择合适大小的图片即可，带透明背景的更好。</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-textarea-wrapper</span> <span class="selector-tag">textarea</span> &#123;</div><div class="line"><span class="attribute">background</span>: <span class="built_in">url</span>(<span class="string">"/resources/Mihawk-s.png"</span>) bottom right no-repeat;&#125;</div></pre></td></tr></table></figure>
<h3 id="评论框背景"><a href="#评论框背景" class="headerlink" title="评论框背景"></a>评论框背景</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-textarea-wrapper</span> &#123;</div><div class="line">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(255, 255, 255, .5);</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h3 id="工具栏背景"><a href="#工具栏背景" class="headerlink" title="工具栏背景"></a>工具栏背景</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-gradient-bg</span> &#123;</div><div class="line">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(255, 255, 255, .5);</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h3 id="“发布”按钮背景"><a href="#“发布”按钮背景" class="headerlink" title="“发布”按钮背景"></a>“发布”按钮背景</h3><p>　　去掉背景图，修改底色，去掉文字阴影。</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-class">.ds-post-button</span> &#123;</div><div class="line">    <span class="attribute">background-image</span>: none;</div><div class="line">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(136, 172, 219, .2);</div><div class="line">    <span class="attribute">text-shadow</span>: none;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h3 id="评论列表背景"><a href="#评论列表背景" class="headerlink" title="评论列表背景"></a>评论列表背景</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-tag">li</span><span class="selector-class">.ds-post</span> &#123;</div><div class="line">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(255, 255, 255, .2);</div><div class="line">&#125;</div><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-tag">li</span><span class="selector-class">.ds-post</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(255, 255, 255, .6) <span class="meta">!important</span>;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h3 id="评论数标签"><a href="#评论数标签" class="headerlink" title="评论数标签"></a>评论数标签</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="selector-id">#ds-thread</span> <span class="selector-id">#ds-reset</span> <span class="selector-tag">li</span><span class="selector-class">.ds-tab</span> <span class="selector-tag">a</span><span class="selector-class">.ds-current</span> &#123;</div><div class="line">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(255, 255, 255, .2);</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h2 id="多说账户设置"><a href="#多说账户设置" class="headerlink" title="多说账户设置"></a>多说账户设置</h2><p>　　在多说网站后台做的一些个性化设置。<code>http://多说用户名.duoshuo.com/admin/settings</code></p>
<h3 id="评论显示方式"><a href="#评论显示方式" class="headerlink" title="评论显示方式"></a>评论显示方式</h3><p>　　比较喜欢嵌套模式，最大层数设为３，评论每页最多30条。</p>
<h3 id="过滤机制"><a href="#过滤机制" class="headerlink" title="过滤机制"></a>过滤机制</h3><p>　　启用”Akismet智能过滤”，等再过一阵子公开博客后大概能用上吧。</p>
<h3 id="默认头像"><a href="#默认头像" class="headerlink" title="默认头像"></a>默认头像</h3><p>　　不大喜欢多说默认未登录访客的头像，修改为 <a href="/resources/qq-avatar.png">QQ 匿名头像</a>。<br>    <img src="/resources/UA-label.png" alt="默认头像"></p>
<h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><ol>
<li><strong><em>多说CSS修改</em></strong> by <strong>多说团队</strong> on <code>2012</code>: <a href="http://dev.duoshuo.com/docs/4ff1cfd0397309552c000017" target="_blank" rel="external">http://dev.duoshuo.com/docs/4ff1cfd0397309552c000017</a></li>
<li><strong>Font Awesome</strong>: <a href="http://fontawesome.io/" target="_blank" rel="external">http://fontawesome.io/</a></li>
<li><strong><em>多说自定义CSS动感头像和多说评论显示User Agent的那些小事</em></strong> by <strong>wsgzao</strong> on <code>2015/04/23</code>: <a href="http://wsgzao.github.io/post/duoshuo/" target="_blank" rel="external">http://wsgzao.github.io/post/duoshuo/</a></li>
<li><strong><em>我的多说CSS样式分享</em></strong> by <strong>赵小萌_Moe</strong> on <code>2015/01/29</code>: <a href="http://myhloli.com/duoshuo-css.html" target="_blank" rel="external">http://myhloli.com/duoshuo-css.html</a></li>
<li><strong><em>多说评论框UA显示/博主标记</em></strong> by <strong>赵小萌_Moe</strong> on <code>2015/02/22</code>: <a href="http://myhloli.com/duoshuo-ua-and-admin-tab.html" target="_blank" rel="external">http://myhloli.com/duoshuo-ua-and-admin-tab.html</a></li>
<li><strong><em>多说评论框各种CSS自定义设置问题收集</em></strong> by <strong>欲思</strong> on <code>2014/04/22</code>: <a href="http://yusi123.com/2689.html" target="_blank" rel="external">http://yusi123.com/2689.html</a></li>
</ol>

      
    </div>
    
  </div>
  
    
    <div class="copyright">
        <p><span>本文标题:</span><a href="/2015/09/29/duoshuo-style/">多说样式折腾记录 — 添加 UA 浏览器标识、旋转头像等</a></p>
        <p><span>文章作者:</span><a href="/" title="回到主页">泽阳</a></p>
        <p><span>发布时间:</span>2015-09-29, 01:24:41</p>
        <p><span>最后更新:</span>2017-01-15, 21:49:19</p>
        <p>
            <span>原始链接:</span><a class="post-url" href="/2015/09/29/duoshuo-style/" title="多说样式折腾记录 — 添加 UA 浏览器标识、旋转头像等">http://git.zhoumq.cn/2015/09/29/duoshuo-style/</a>
            <span class="copy-path" data-clipboard-text="原文: http://git.zhoumq.cn/2015/09/29/duoshuo-style/　　作者: 泽阳" title="点击复制文章链接"><i class="fa fa-clipboard"></i></span>
            <script> var clipboard = new Clipboard('.copy-path'); </script>
        </p>
        <p>
            <span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" title="CC BY-NC-SA 4.0 International" target = "_blank">"署名-非商用-相同方式共享 4.0"</a> 转载请保留原文链接及作者。
        </p>
    </div>



    <nav id="article-nav">
        
            <div id="article-nav-newer" class="article-nav-title">
                <a href="/2017/01/12/hello-world/">
                    Hello World
                </a>
            </div>
        
        
    </nav>

  
</article>

    <div id="toc" class="toc-article">
        <strong class="toc-title">文章目录</strong>
        
            <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#intro"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#相关下载"><span class="toc-number">1.1.</span> <span class="toc-text">相关下载</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#UA-浏览器标识"><span class="toc-number">2.</span> <span class="toc-text">UA 浏览器标识</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#本地化-embed-js"><span class="toc-number">2.1.</span> <span class="toc-text">本地化 embed-js</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#引入-Font-Awesome"><span class="toc-number">2.2.</span> <span class="toc-text">引入 Font Awesome</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#添加对应-CSS"><span class="toc-number">2.3.</span> <span class="toc-text">添加对应 CSS</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#显示博主标记"><span class="toc-number">2.4.</span> <span class="toc-text">显示博主标记</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#个性化-CSS-样式"><span class="toc-number">3.</span> <span class="toc-text">个性化 CSS 样式</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#旋转头像"><span class="toc-number">3.1.</span> <span class="toc-text">旋转头像</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#通用样式"><span class="toc-number">3.2.</span> <span class="toc-text">通用样式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#喜欢按钮样式"><span class="toc-number">3.3.</span> <span class="toc-text">喜欢按钮样式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#社交账号登陆透明度"><span class="toc-number">3.4.</span> <span class="toc-text">社交账号登陆透明度</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#评论、文本框字体"><span class="toc-number">3.5.</span> <span class="toc-text">评论、文本框字体</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#用户名等超链接颜色"><span class="toc-number">3.6.</span> <span class="toc-text">用户名等超链接颜色</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#未登录用户名字颜色"><span class="toc-number">3.7.</span> <span class="toc-text">未登录用户名字颜色</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#评论框背景图片"><span class="toc-number">3.8.</span> <span class="toc-text">评论框背景图片</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#评论框背景"><span class="toc-number">3.9.</span> <span class="toc-text">评论框背景</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#工具栏背景"><span class="toc-number">3.10.</span> <span class="toc-text">工具栏背景</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#“发布”按钮背景"><span class="toc-number">3.11.</span> <span class="toc-text">“发布”按钮背景</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#评论列表背景"><span class="toc-number">3.12.</span> <span class="toc-text">评论列表背景</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#评论数标签"><span class="toc-number">3.13.</span> <span class="toc-text">评论数标签</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#多说账户设置"><span class="toc-number">4.</span> <span class="toc-text">多说账户设置</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#评论显示方式"><span class="toc-number">4.1.</span> <span class="toc-text">评论显示方式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#过滤机制"><span class="toc-number">4.2.</span> <span class="toc-text">过滤机制</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#默认头像"><span class="toc-number">4.3.</span> <span class="toc-text">默认头像</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#参考资料"><span class="toc-number">5.</span> <span class="toc-text">参考资料</span></a></li></ol>
        
    </div>
    <style>
        .left-col .switch-btn,
        .left-col .switch-area {
            display: none;
        }
        .toc-level-3 i,
        .toc-level-3 ol {
            display: none !important;
        }
    </style>

    <input type="button" id="tocButton" value="隐藏目录"  title="点击按钮隐藏或者显示文章目录">

    <script>
        yiliaConfig.toc = ["隐藏目录", "显示目录", !!"false"];
    </script>



    
<div class="share">
    
        <div class="bdsharebuttonbox">
            <a href="#" class="fa fa-twitter bds_twi" data-cmd="twi" title="分享到推特"></a>
            <a href="#" class="fa fa-weibo bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
            <a href="#" class="fa fa-qq bds_sqq" data-cmd="sqq" title="分享给 QQ 好友"></a>
            <a href="#" class="fa fa-files-o bds_copy" data-cmd="copy" title="复制网址"></a>
            <a href="#" class="fa fa fa-envelope-o bds_mail" data-cmd="mail" title="通过邮件分享"></a>
            <a href="#" class="fa fa-weixin bds_weixin" data-cmd="weixin" title="生成文章二维码"></a>
            <a href="#" class="fa fa-share-alt bds_more" data-cmd="more"></i></a>
        </div>
        <script>
            window._bd_share_config={
                "common":{"bdSnsKey":{},"bdText":"多说样式折腾记录 — 添加 UA 浏览器标识、旋转头像等　| 泽阳　","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
        </script>
    

    
</div>







    
      <div class="duoshuo" id="comments">
    <div id="comment-box" ></div>
    <div class="ds-thread" id="ds-thread" data-thread-key="2015/09/29/duoshuo-style/" data-title="多说样式折腾记录 — 添加 UA 浏览器标识、旋转头像等" data-url="http://git.zhoumq.cn/2015/09/29/duoshuo-style/"></div>
    <script>
        var duoshuoQuery = {short_name:"null"};
        var loadComment = function(){
            var d = document, s = d.createElement('script');
			s.src = "http://git.zhoumq.cn/resources/embed.js";
            //s.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
            s.async = true; s.charset = 'UTF-8';
            (d.head || d.body).appendChild(s);
        }

        
    </script>
    
    <script> loadComment(); </script>

</div>
    




    <div class="scroll" id="post-nav-button">
        
            <a href="/2017/01/12/hello-world/" title="上一篇: Hello World">
                <i class="fa fa-angle-left"></i>
            </a>
        

        <a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a>

        
            <a href="/" title="回到主页"><i class="fa fa-home"></i></a>
        
    </div>

    <ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2017/01/13/test/">Minecraft与《协纪辨方书》</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/01/13/文章标题/">MVVM模式快速入门</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/01/12/hello-world/">Hello World</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/09/29/duoshuo-style/">多说样式折腾记录 — 添加 UA 浏览器标识、旋转头像等</a></li></ul>




    <script>
        
    </script>
</div>
      <footer id="footer">
    <div class="outer">
        <div id="footer-info">
            <div class="footer-left">
                <i class="fa fa-copyright"></i> 
                2016-2017 泽阳
            </div>
            <div class="footer-right">
                <a href="http://hexo.io/" target="_blank" title="快速、简洁且高效的博客框架">Hexo</a>  Theme <a href="https://github.com/MOxFIVE/hexo-theme-yelee" target="_blank" title="简而不减 Hexo 双栏博客主题  v3.5">Yelee</a> by MOxFIVE <i class="fa fa-heart animated infinite pulse"></i>
            </div>
        </div>
        
            <div class="visit">
                
                    <span id="busuanzi_container_site_pv" style='display:none'>
                        <span id="site-visit" title="本站到访数"><i class="fa fa-user" aria-hidden="true"></i><span id="busuanzi_value_site_uv"></span>
                        </span>
                    </span>
                
                
                    <span>| </span>
                
                
                    <span id="busuanzi_container_page_pv" style='display:none'>
                        <span id="page-visit"  title="本页阅读量"><i class="fa fa-eye animated infinite pulse" aria-hidden="true"></i><span id="busuanzi_value_page_pv"></span>
                        </span>
                    </span>
                
            </div>
        
    </div>
</footer>
    </div>
    
<script data-main="/js/main.js" src="//cdn.bootcss.com/require.js/2.2.0/require.min.js"></script>

    <script>
        $(document).ready(function() {
            var iPad = window.navigator.userAgent.indexOf('iPad');
            if (iPad > -1 || $(".left-col").css("display") === "none") {
                var bgColorList = ["#9db3f4", "#414141", "#e5a859", "#f5dfc6", "#c084a0", "#847e72", "#cd8390", "#996731"];
                var bgColor = Math.ceil(Math.random() * (bgColorList.length - 1));
                $("body").css({"background-color": bgColorList[bgColor], "background-size": "cover"});
            }
            else {
                var backgroundnum = 5;
                var backgroundimg = "url(/background/bg-x.jpg)".replace(/x/gi, Math.ceil(Math.random() * backgroundnum));
                $("body").css({"background": backgroundimg, "background-attachment": "fixed", "background-size": "cover"});
            }
        })
    </script>





<div class="scroll" id="scroll">
    <a href="#" title="返回顶部"><i class="fa fa-arrow-up"></i></a>
    <a href="#comments" onclick="load$hide();" title="查看评论"><i class="fa fa-comments-o"></i></a>
    <a href="#footer" title="转到底部"><i class="fa fa-arrow-down"></i></a>
</div>
<script>
    // Open in New Window
    
        var oOpenInNew = {
            
            
            
            
            
            
             archives: ".archive-article-title", 
             miniArchives: "a.post-list-link", 
            
             friends: "#js-friends a", 
             socail: ".social a" 
        }
        for (var x in oOpenInNew) {
            $(oOpenInNew[x]).attr("target", "_blank");
        }
    
</script>

<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
  </div>
</body>
</html>